<template>
  <div>
    <el-table
      :data="sshList"
      style="width: 100%">
      <el-table-column
        prop="hostIp"
        label="IP地址"
        width="180">
      </el-table-column>
      <el-table-column
        prop="hostPort"
        label="端口"
        width="180">
      </el-table-column>
      <el-table-column
        prop="userName"
        label="用户名">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import * as ssh from "@/api/ssh";
export default {
  name: 'SshIndex',

  data() {
    return {
      sshList:[{
        hostIp: "10.31.31.134"
      }]
    };
  },

  created() {
    this.initInfo()
  },

  methods: {
    initInfo() {
        ssh.sshList().then((res) => {
            // console.log(res)
            this.sshList = res.data
            console.log(this.sshList)
        })
        console.log(this.sshList)
    }
  },
};
</script>